package cn.tedu.boot06.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi")
    public String bmi(double h,double w){
        double bmi = w/(h*h);
        if (bmi<18.5){
            return "多吃点肉吧,你太瘦了!";
        }
        if (bmi<22){
            return "身体杠杠滴!";
        }
        if (bmi<28){
            return "少吃点吧!";
        }
        return "别吃了,你太肥了!";
    }
}
